<?php
//测试控制器类
class IndexController extends Controller{
    public function __init(){
        //判断是否登陆
        $admin = Q('session.admin');
        if(empty($admin)){
            header('location:'.u('User/Login/Login'));
        }
        $this -> assign('admin',$admin);
    }

    //动作方法
    public function index(){
        //显示视图
        $this->display('Template/admin/header');
        $this->display();
    }
}
